home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 52
/
Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso
/
Aminet
/
game
/
patch
/
WHDIDemos.lzh
/
Angels_CopperMaster.lha
/
Install
< prev
next >
Wrap
Text File
|
1980-07-07
|
3KB
|
150 lines
;****************************
(set #readme-file "ReadMe") ;name of readme file
(set #cleanup "") ;files to delete after install
;****************************
;----------------------------
; checks if given program is installed, if not abort install
; #program - to check
(procedure P_ChkRun
(if
(= 0 (run ("cd SYS:\nWhich %s" #program)))
("")
(abort
(cat
"You must install \"" #program "\" first!\n"
"It must be accessible via the path.\n"
"You can find it in the WHDLoad package."
)
)
)
)
(procedure P_ChkRun_XFD
(if
(= 0 (run ("cd SYS:\nWhich %s" #program)))
("")
(abort
(cat
"You must install \"" #program "\" first!\n"
"It must be accessible via the path.\n"
"You can find it in the XFD package."
)
)
)
)
;----------------------------
; Wait for inserting disk
; IN: #AD_disk - name of disk
; OUT: -
(procedure P_disk
(message ("Ensure the file ANGELS.COPPERMASTER is available in RAM:"))
)
;****************************
(if
(exists #readme-file)
(if
(= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
("")
(run ("SYS:Utilities/More %s" #readme-file))
)
)
(set #program "WHDLoad")
(P_ChkRun)
(set #program "xfddecrunch")
(P_ChkRun_XFD)
(set @default-dest
(askdir
(prompt ("Where should \"%s\" be installed?\nA drawer \"%s\" will be automatically created." @app-name @app-name))
(help @askdir-help)
(default @default-dest)
(disk)
)
)
(set #dest (tackon @default-dest @app-name))
(if
(exists #dest)
(
(set #choice
(askbool
(prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted?" #dest))
(default 1)
(choices "Delete" "Skip")
(help @askbool-help)
)
)
(if
(= #choice 1)
(run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
)
)
)
(makedir #dest
(help @makedir-help)
(infos)
)
;----------------------------
(copyfiles
(help @copyfiles-help)
(source ("Copper.Slave"))
(dest #dest)
)
(copyfiles
(help @copyfiles-help)
(source ("CopperMaster.info"))
(dest #dest)
)
(copyfiles
(help @copyfiles-help)
(source ("proreplay.bin"))
(dest #dest)
)
(if
(exists #readme-file)
(copyfiles
(help @copyfiles-help)
(source #readme-file)
(dest #dest)
)
)
(if
(exists ("Readme.info"))
(copyfiles
(help @copyfiles-help)
(source ("Readme.info"))
(dest #dest)
)
)
;----------------------------
(P_disk)
(if
(= 0 (run ("xfddecrunch \"RAM:ANGELS.COPPERMASTER\" \"RAM:COPPER\" >CON:///1000//CLOSE" #dest)))
("")
(abort "\"xfddecrunch\" has failed to decompress the demo")
)
(copyfiles
(help @copyfiles-help)
(source ("RAM:COPPER"))
(dest #dest)
)
;----------------------------
(run ("Delete RAM:ANGELS.COPPERMASTER.LHA ALL QUIET FORCE" #cleanup))
(run ("Delete RAM:ANGELS.COPPERMASTER ALL QUIET FORCE" #cleanup))
(run ("Delete RAM:COPPER ALL QUIET FORCE" #cleanup))
(exit)